<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-异常兑换监控管理">
</@frame.head>
<style>
.select-box{
width:80px
}
.input-text{
width:50px
}
.table td{
   padding-left:2em;
}
</style>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 监控管理 <span class="c-gray en">&gt;</span> 订单提交限制 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="${contextPath}/order_rule/order_rule_info" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">	
<b style="font-size: 16px;">设置订单提交限制：</b>
<form method="post" name="save_form"  id="save_form"  action="${contextPath}/order_rule/add_order_rule_info" >    
    <div class="text-c">
    <table class="table">
      <tr>
        <th>订单商品限制：</th>
      </tr>
      <tr>
			<td>
			<input type="checkbox"   id="productNormalFlag"  onChange="selectStata(this.id,this.checked)" 
			<#if orderRuleCommand.productNormalFlag ==true> checked="checked" </#if> />
			<input type="hidden"  name="productNormalFlag" id="productNormalFlagValue" value="${orderRuleCommand.productNormalFlag?string}" /> 
			实物商品订单单个商品兑换数量不可超过
			<input width="40px"  class="input-text  radius size-S" value="${orderRuleCommand.productNormal}" type="text" name="productNormal" id="productNormal"   onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/> 
			&nbsp;个商品
			</td>
			<td>
			 <#if checkStat ==1><font color="red">${message} </font> </#if>
			</td>
	  </tr>
      <tr>
			<td>
			<input type="checkbox"   id="orderProductNormalFlag"  onChange="selectStata(this.id,this.checked)"  
			<#if orderRuleCommand.orderProductNormalFlag ==true> checked="checked" </#if> />
			<input type="hidden"  name="orderProductNormalFlag" id="orderProductNormalFlagValue" value="${orderRuleCommand.orderProductNormalFlag?string}" /> 
			实物商品订单单笔订单兑换数量不可超过
			<input width="40px"  class="input-text  radius size-S" value="${orderRuleCommand.orderProductNormal}" type="text" name="orderProductNormal" id="orderProductNormal"   onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/> 
			&nbsp;个商品
			</td>
			<td>
			 <#if checkStat ==3><font color="red">${message} </font> </#if>
			</td>
	  </tr>
      <tr>
			<td>
			<input type="checkbox"   id="productVirtualFlag"  onChange="selectStata(this.id,this.checked)"  
			<#if orderRuleCommand.productVirtualFlag ==true> checked="checked" </#if> />
			<input type="hidden"  name="productVirtualFlag" id="productVirtualFlagValue" value="${orderRuleCommand.productVirtualFlag?string}" /> 
			非实物商品订单单个商品兑换数量不可超过
			<input width="40px"  class="input-text  radius size-S" value="${orderRuleCommand.productVirtual}" type="text" name="productVirtual" id="productVirtual"   onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/> 
			&nbsp;个商品
			</td>
			<td>
			 <#if checkStat ==2><font color="red">${message} </font> </#if>
			</td>
	  </tr>
      <tr>
        <th>未支付订单限制：</th>
      </tr>
      <tr>
			<td>
			<input type="checkbox"   id="orderIsBuyAllFlag"  onChange="selectStata(this.id,this.checked)"  
			<#if orderRuleCommand.orderIsBuyAllFlag ==true> checked="checked" </#if> />
			<input type="hidden"  name="orderIsBuyAllFlag" id="orderIsBuyAllFlagValue" value="${orderRuleCommand.orderIsBuyAllFlag?string}" /> 
			同一时间内，未支付所有订单 不可超过
			<input width="40px"  class="input-text  radius size-S" value="${orderRuleCommand.orderIsBuyAll}" type="text" name="orderIsBuyAll" id="orderIsBuyAll"   onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/> 
			&nbsp;个
			</td>
			<td>
			 <#if checkStat ==4><font color="red">${message} </font> </#if>
			</td>
	  </tr>
      <tr>
			<td>
			<input type="checkbox"   id="orderNormalFlag"  onChange="selectStata(this.id,this.checked)"  
			<#if orderRuleCommand.orderNormalFlag ==true> checked="checked" </#if> />
			<input type="hidden"  name="orderNormalFlag" id="orderNormalFlagValue" value="${orderRuleCommand.orderNormalFlag?string}" /> 
			同一时间内，未支付实物商品订单不可超过
			<input width="40px"  class="input-text  radius size-S" value="${orderRuleCommand.orderNormal}" type="text" name="orderNormal" id="orderNormal"   onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/> 
			&nbsp;个
			</td>
			<td>
			 <#if checkStat ==5><font color="red">${message} </font> </#if>
			</td>
	  </tr>
      <tr>
			<td>
			<input type="checkbox"   id="orderVirtualFlag"  onChange="selectStata(this.id,this.checked)"  
			<#if orderRuleCommand.orderVirtualFlag ==true> checked="checked" </#if> />
			<input type="hidden"  name="orderVirtualFlag" id="orderVirtualFlagValue" value="${orderRuleCommand.orderVirtualFlag?string}" /> 
			同一时间内，未支付非实物商品订单不可超过
			<input width="40px"  class="input-text  radius size-S" value="${orderRuleCommand.orderVirtual}" type="text" name="orderVirtual" id="orderVirtual"   onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/> 
			&nbsp;个
			</td>
			<td>
			 <#if checkStat ==6><font color="red">${message} </font> </#if>
			</td>
	  </tr>
      <tr>
       <td ><button type="submit" class="btn btn-primary radius">提交</button></td>        
      </tr>
    </table>
    <div style="border-top: 2px solid #ddd;">
	<table class="table">
		<tr>
			<td width="150px">最后修改人：${businessRulesLog.lastModifyName }</td>
			<td>修改时间：${(businessRulesLog.lastModifyDate?string("yyyy-MM-dd HH:mm:ss"))!}</td>
		</tr>
	</table>
	</div>
    </div>
    </div>
</form>
</div>
<span  style="display:none;" id="hidmessage">${message} </span>
<@frame.end "default">
</@frame.end>
<#if checkFlag?? && checkFlag==true> <script>layer.alert($("#hidmessage").html())</script></#if>
<#if checkFlag?? && checkFlag==false> <script>layer.alert("保存失败:"+$("#hidmessage").html())</script></#if>
<script type="text/javascript">
var path="${contextPath}";
function selectStata(id,state) {
	  $("#"+id+"Value").val(state)
	}

</script>